import { request } from '@pkg/request/src';

export enum Api {
  page = '/appointment/page',
  list = '/appointment/list',
  getAppointmentInfo = '/appointment/get',
  add = '/appointment/save',
  update = '/appointment/update',
  remove = '/appointment/remove',
  appointmentCheckSub = '/appointment/appointmentCheckSub',
}

export const list = () =>
  request.get(
    { url: Api.list },
    {
      errorMessageMode: 'none',
      successMessageMode: 'none',
    },
  );

export const getAppointmentInfo = (params) =>
  request.get(
    {
      url: Api.getAppointmentInfo,
      params: params,
    },
    { errorMessageMode: 'none', successMessageMode: 'none' },
  );
export const appointmentCheckSub = (params) =>
  request.post(
    {
      url: Api.appointmentCheckSub,
      params: params,
    },
    { errorMessageMode: 'none' },
  );
